﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace spotnumbers.Model
{
    public class Number
    {
        public String Text { get; set; }
        public int Id { get; set;  }
        public double X { get; set; }
        public double Y { get; set; }
        public double Rotate { get; set; }
        public double RotateVelocity { get; set; }
        public Number()
        {
        }
        public Number(int number, double x, double y)
        {
            this.Id = number;
            this.X = x;
            this.Y = y;
        }
        public double DistanceTo(Number other)
        {
    		return Math.Sqrt((other.X - X) * (other.X - X) + (other.Y - Y) * (other.Y - Y));
        }
        public double DistanceTo(double x, double y)
        {
            return Math.Sqrt((x - X) * (x - X) + (y - Y) * (y - Y));
        }
        public override string ToString()
        {
            var s = "N" + Id + ":" + X + "," + Y;
            return s;
        }
    }
}
